<!-- build time:Wed Apr 23 2025 13:16:13 GMT+0800 (中国标准时间) --><!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#222"><meta http-equiv="X-UA-COMPATIBLE" content="IE=edge,chrome=1"><meta name="renderer" content="webkit"><link rel="icon" type="image/ico" sizes="32x32" href="/assets/favicon.ico"><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="alternate" href="/rss.xml" title="LinuxSre云原生" type="application/rss+xml"><link rel="alternate" href="/atom.xml" title="LinuxSre云原生" type="application/atom+xml"><link rel="alternate" type="application/json" title="LinuxSre云原生" href="http://blog.zhanglongfei.cloud/feed.json"><link rel="preconnect" href="https://s4.zstatic.net"><link rel="preconnect" href="https://at.alicdn.com"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Mulish:400,400italic,700,700italic%7CFredericka%20the%20Great:400,400italic,700,700italic%7CNoto%20Serif%20JP:400,400italic,700,700italic%7CNoto%20Serif%20SC:400,400italic,700,700italic%7CInconsolata:400,400italic,700,700italic&display=swap&subset=latin,latin-ext" media="none" onload="this.media&#x3D;&#39;all&#39;"><link rel="stylesheet" href="/css/app.css?v=0.4.17"><link rel="modulepreload" href="/js/chunk-CFZVTM5E.js"><link rel="modulepreload" href="/js/chunk-DSDDCHK4.js"><link rel="modulepreload" href="/js/chunk-GPV6MJAR.js"><link rel="modulepreload" href="/js/chunk-H5G2FCYC.js"><link rel="modulepreload" href="/js/chunk-WVP4CIHH.js"><link rel="modulepreload" href="/js/copy-tex-BNTCTEYN.js"><link rel="modulepreload" href="/js/index.esm-5WR6FBAT.js"><link rel="modulepreload" href="/js/post-ERM2LZ6P.js"><link rel="modulepreload" href="/js/quicklink-U3YMDO3L.js"><link rel="modulepreload" href="/js/search-NVSEMC4Y.js"><link rel="modulepreload" href="/js/siteInit.js"><link rel="modulepreload" href="/js/tcomments-OCTPMCAB.js"><link rel="preload" href="https://tva3.sinaimg.cn/large/6833939bly1giciszlczyj20zk0m816d.jpg" as="image" fetchpriority="high"><link rel="preload" href="https://tva3.sinaimg.cn/large/6833939bly1gicit31ffoj20zk0m8naf.jpg" as="image" fetchpriority="high"><link rel="preload" href="https://tva3.sinaimg.cn/large/6833939bly1gicitcxhpij20zk0m8hdt.jpg" as="image" fetchpriority="high"><link rel="preload" href="https://tva3.sinaimg.cn/large/6833939bly1gicis3attqj20zk0m8k7l.jpg" as="image" fetchpriority="high"><link rel="preload" href="https://tva3.sinaimg.cn/large/6833939bly1gicit4jrvuj20zk0m8785.jpg" as="image" fetchpriority="high"><link rel="preload" href="https://tva3.sinaimg.cn/large/6833939bly1giciryrr3rj20zk0m8nhk.jpg" as="image" fetchpriority="high"><meta name="keywords" content="Hexo主题安装及配置"><meta name="description" content="这是一个LinuxSre相关的技术博客"><link rel="canonical" href="http://blog.zhanglongfei.cloud/posts/1378412876.html"><title>Hexo主题安装及配置</title><meta name="generator" content="Hexo 7.3.0"></head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">Hexo主题安装及配置</h1><div class="meta"><span class="item" title="创建时间：2025-04-17 12:35:00"><span class="icon"><i class="ic i-calendar"></i></span><span class="text">发表于</span><time itemprop="dateCreated datePublished" datetime="2025-04-17T12:35:00+08:00">2025-04-17</time></span><span class="item" title="本文字数"><span class="icon"><i class="ic i-pen"></i></span><span class="text">本文字数</span><span>20k</span><span class="text">字</span></span><span class="item" title="阅读时长"><span class="icon"><i class="ic i-clock"></i></span><span class="text">阅读时长</span><span>18 分钟</span></span></div></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span><span class="line"></span><span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">hexo-blog</a></li></ul><ul class="right" id="rightNav"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div class="pjax" id="imgs"><ul><li class="item" style="background-image:url(&quot;https://tva3.sinaimg.cn/large/6833939bly1giciszlczyj20zk0m816d.jpg&quot;)"></li><li class="item" style="background-image:url(&quot;https://tva3.sinaimg.cn/large/6833939bly1gicit31ffoj20zk0m8naf.jpg&quot;)"></li><li class="item" style="background-image:url(&quot;https://tva3.sinaimg.cn/large/6833939bly1gicitcxhpij20zk0m8hdt.jpg&quot;)"></li><li class="item" style="background-image:url(&quot;https://tva3.sinaimg.cn/large/6833939bly1gicis3attqj20zk0m8k7l.jpg&quot;)"></li><li class="item" style="background-image:url(&quot;https://tva3.sinaimg.cn/large/6833939bly1gicit4jrvuj20zk0m8785.jpg&quot;)"></li><li class="item" style="background-image:url(&quot;https://tva3.sinaimg.cn/large/6833939bly1giciryrr3rj20zk0m8nhk.jpg&quot;)"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"></path></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"></use><use xlink:href="#gentle-wave" x="48" y="3"></use><use xlink:href="#gentle-wave" x="48" y="5"></use><use xlink:href="#gentle-wave" x="48" y="7"></use></g></svg></div><main><div class="inner"><div class="pjax" id="main"><div class="article wrap"><div class="breadcrumb" itemlistelement itemscope itemtype="https://schema.org/BreadcrumbList"><i class="ic i-home"></i><span><a href="/">首页</a></span><i class="ic i-angle-right"></i><span class="current" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a href="/categories/Hexo/" itemprop="item" rel="index" title="分类于Hexo"><span itemprop="name">Hexo<meta itemprop="position" content="0"></span></a></span></div><article class="post block" itemscope itemtype="http://schema.org/Article" lang="zh-CN"><link itemprop="mainEntityOfPage" href="http://blog.zhanglongfei.cloud/posts/1378412876.html"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/assets/avatar.jpg"><meta itemprop="name" content="LinuxLearner"><meta itemprop="description" content=", 这是一个LinuxSre相关的技术博客"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="LinuxSre云原生"></span><div class="body md" itemprop="articleBody"><h1 id="font-stylecolor1dc0c9hexo主题安装font"><a class="anchor" href="#font-stylecolor1dc0c9hexo主题安装font">#</a> <font style="color:#1DC0C9">Hexo 主题安装</font></h1><h2 id="font-stylecolor1dc0c9hexo主题安装font-2"><a class="anchor" href="#font-stylecolor1dc0c9hexo主题安装font-2">#</a> <font style="color:#1DC0C9">Hexo 主题安装</font></h2><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># Hexo 默认主题过于简单，不适合对外展示。为了美化网站，我们可以访问</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token comment"># Hexo 官方主题库 来挑选合适的主题进行配置，进而提升网站整体效果。</span></pre></td></tr><tr><td data-num="3"></td><td><pre>主题推荐: ShokaX、Matery、Yilia-Plus、3-Hexo。</pre></td></tr><tr><td data-num="4"></td><td><pre>https://blog.lixiaomu.fun/posts/43857/</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>https://hexo.io/themes/</pre></td></tr></table></figure><p>1. 克隆 shokax 主题到 Hexo 项目的 themes/ 目录下</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token builtin class-name">cd</span> /e/hexo-blog/</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token function">git</span> clone https://mirror-ghproxy.com/https://github.com/Im-oldxu/hexo-theme-shokaX.git themes/shokax</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token function">git</span> clone https://github.com/Im-oldxu/hexo-theme-shokaX.git themes/shokax</pre></td></tr></table></figure><p>2. 安装 shokax 主题依赖的插件</p><ul><li>hexo-renderer-multi-markdown-it ，md 文件渲染器、压缩 css/js/html，<font style="color:#DF2A3F">必须安装</font></li><li>hexo-autoprefixer 给生成的 css 文件们添加浏览器前缀，必须安装</li></ul><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ <span class="token function">cat</span> package.json <span class="token operator">|</span><span class="token function">grep</span> marked</pre></td></tr><tr><td data-num="2"></td><td><pre>    <span class="token string">"hexo-renderer-marked"</span><span class="token builtin class-name">:</span> <span class="token string">"^7.0.0"</span>,</pre></td></tr><tr><td data-num="3"></td><td><pre>$ <span class="token function">npm</span> list<span class="token operator">|</span><span class="token function">grep</span> marked</pre></td></tr><tr><td data-num="4"></td><td><pre>├── hexo-renderer-marked@7.0.1</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment"># 卸载默认的 markdown 插件</span></pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token function">npm</span> uninstall hexo-renderer-marked <span class="token parameter variable">--save</span></pre></td></tr><tr><td data-num="8"></td><td><pre></pre></td></tr><tr><td data-num="9"></td><td><pre><span class="token comment"># 安装依赖插件</span></pre></td></tr><tr><td data-num="10"></td><td><pre><span class="token function">npm</span> <span class="token function">install</span> hexo-renderer-multi-markdown-it <span class="token parameter variable">--save</span> </pre></td></tr><tr><td data-num="11"></td><td><pre><span class="token function">npm</span> <span class="token function">install</span> hexo-autoprefixer <span class="token parameter variable">--save</span></pre></td></tr></table></figure><p>3. 安装 shokax 主题相关其他依赖程序</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token builtin class-name">cd</span> /e/hexo-blog/</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token function">npm</span> <span class="token function">install</span> <span class="token function">pnpm</span> <span class="token parameter variable">-g</span></pre></td></tr><tr><td data-num="3"></td><td><pre></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token builtin class-name">cd</span> themes/shokax</pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token function">pnpm</span> <span class="token function">install</span></pre></td></tr><tr><td data-num="6"></td><td><pre></pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token comment"># pnpm 还需运⾏如下命令进⾏编译</span></pre></td></tr><tr><td data-num="8"></td><td><pre><span class="token function">node</span> toolbox/hoistdep.mjs</pre></td></tr><tr><td data-num="9"></td><td><pre><span class="token function">node</span> toolbox/compiler.mjs</pre></td></tr></table></figure><h2 id="font-stylecolor1dc0c9hexo主题简单配置font"><a class="anchor" href="#font-stylecolor1dc0c9hexo主题简单配置font">#</a> <font style="color:#1DC0C9">Hexo 主题简单配置</font></h2><p>1. 配置 Hexo 项目应用 shokax 主题，找到 Hexo 根目录下的 <code>_config.yml</code> 文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># Extensions</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token comment">## Plugins: https://hexo.io/plugins/</span></pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token comment">## Themes: https://hexo.io/themes/</span></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment"># theme: landscape  #注释点默认的主题</span></pre></td></tr><tr><td data-num="7"></td><td><pre>theme: shokax <span class="token comment">#配置新的主题 (名称要和主题项目名称一致)</span></pre></td></tr></table></figure><p>2. 在 Hexo 根目录下的 <code>_config.yml</code> 文件配置对应的 Markdown 渲染，以及压缩等功能。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># syntax_highlighter: highlight.js # 注释掉默认</span></pre></td></tr><tr><td data-num="4"></td><td><pre>syntax_highlighter: <span class="token boolean">false</span> <span class="token comment"># 停用代码高亮，否则代码块的 mac 样式不能正常显示。</span></pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment"># Markdown 配置</span></pre></td></tr><tr><td data-num="7"></td><td><pre>markdown:</pre></td></tr><tr><td data-num="8"></td><td><pre>  render: <span class="token comment"># 渲染器设置</span></pre></td></tr><tr><td data-num="9"></td><td><pre>    html: <span class="token boolean">true</span> <span class="token comment"># 表示允许 Markdown 文件中的 HTML 标签被渲染。</span></pre></td></tr><tr><td data-num="10"></td><td><pre>    xhtmlOut: <span class="token boolean">true</span> <span class="token comment"># 使用 '/' 来闭合单标签 （比如 &lt;br />）。</span></pre></td></tr><tr><td data-num="11"></td><td><pre>    breaks: <span class="token boolean">true</span> <span class="token comment"># 转换段落里的 '\n' 到 &lt;br>。</span></pre></td></tr><tr><td data-num="12"></td><td><pre>    linkify: <span class="token boolean">true</span> <span class="token comment"># 将类似 URL 的文本自动转换为链接。</span></pre></td></tr><tr><td data-num="13"></td><td><pre>    typographer:</pre></td></tr><tr><td data-num="14"></td><td><pre>    quotes: <span class="token string">"“”‘’"</span></pre></td></tr><tr><td data-num="15"></td><td><pre>  plugins: <span class="token comment"># markdown-it 插件设置</span></pre></td></tr><tr><td data-num="16"></td><td><pre>    - plugin:</pre></td></tr><tr><td data-num="17"></td><td><pre>        name: markdown-it-toc-and-anchor</pre></td></tr><tr><td data-num="18"></td><td><pre>        enable: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="19"></td><td><pre>        options: <span class="token comment"># 文章目录以及锚点应用的 class 名称，shoka 系主题必须设置成这样</span></pre></td></tr><tr><td data-num="20"></td><td><pre>          tocClassName: <span class="token string">"toc"</span></pre></td></tr><tr><td data-num="21"></td><td><pre>          anchorClassName: <span class="token string">"anchor"</span></pre></td></tr><tr><td data-num="22"></td><td><pre>    - plugin:</pre></td></tr><tr><td data-num="23"></td><td><pre>        name: markdown-it-multimd-table</pre></td></tr><tr><td data-num="24"></td><td><pre>        enable: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="25"></td><td><pre>        options:</pre></td></tr><tr><td data-num="26"></td><td><pre>          multiline: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="27"></td><td><pre>          rowspan: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="28"></td><td><pre>          headerless: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="29"></td><td><pre>    - plugin:</pre></td></tr><tr><td data-num="30"></td><td><pre>        name: ./markdown-it-furigana</pre></td></tr><tr><td data-num="31"></td><td><pre>        enable: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="32"></td><td><pre>        options:</pre></td></tr><tr><td data-num="33"></td><td><pre>          fallbackParens: <span class="token string">"()"</span></pre></td></tr><tr><td data-num="34"></td><td><pre>    - plugin:</pre></td></tr><tr><td data-num="35"></td><td><pre>        name: ./markdown-it-spoiler</pre></td></tr><tr><td data-num="36"></td><td><pre>        enable: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="37"></td><td><pre>        options:</pre></td></tr><tr><td data-num="38"></td><td><pre>          title: <span class="token string">"你知道得太多了"</span></pre></td></tr><tr><td data-num="39"></td><td><pre></pre></td></tr><tr><td data-num="40"></td><td><pre><span class="token comment"># 生成静态文件时压缩 css/html</span></pre></td></tr><tr><td data-num="41"></td><td><pre>minify:</pre></td></tr><tr><td data-num="42"></td><td><pre>  html:</pre></td></tr><tr><td data-num="43"></td><td><pre>    enable: <span class="token boolean">true</span> <span class="token comment"># 开启 HTML 优化</span></pre></td></tr><tr><td data-num="44"></td><td><pre>    minifier: html-minifier</pre></td></tr><tr><td data-num="45"></td><td><pre>    exclude: <span class="token comment"># 排除 hexo-feed 用到的模板文件</span></pre></td></tr><tr><td data-num="46"></td><td><pre>      - <span class="token string">'**/json.ejs'</span></pre></td></tr><tr><td data-num="47"></td><td><pre>      - <span class="token string">'**/atom.ejs'</span></pre></td></tr><tr><td data-num="48"></td><td><pre>      - <span class="token string">'**/rss.ejs'</span></pre></td></tr><tr><td data-num="49"></td><td><pre>  css:</pre></td></tr><tr><td data-num="50"></td><td><pre>    enable: <span class="token boolean">true</span>	<span class="token comment"># # 开启 CSS 优化</span></pre></td></tr><tr><td data-num="51"></td><td><pre>    exclude:</pre></td></tr><tr><td data-num="52"></td><td><pre>      - <span class="token string">'**/*.min.css'</span></pre></td></tr><tr><td data-num="53"></td><td><pre>  js:</pre></td></tr><tr><td data-num="54"></td><td><pre>    enable: <span class="token boolean">false</span> <span class="token comment"># ShokaX 自带 esbuild 优化，不建议开启，其他主题建议开启</span></pre></td></tr><tr><td data-num="55"></td><td><pre></pre></td></tr><tr><td data-num="56"></td><td><pre><span class="token comment"># 缺少这个插件，首页卡片翻转效果在部分浏览器中无法正确显示。</span></pre></td></tr><tr><td data-num="57"></td><td><pre>autoprefixer:</pre></td></tr><tr><td data-num="58"></td><td><pre>  exclude:</pre></td></tr><tr><td data-num="59"></td><td><pre>    - <span class="token string">"*.min.css"</span></pre></td></tr></table></figure><p>3. 重新运行 Hexo</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token builtin class-name">cd</span> /e/hexo-blog/</pre></td></tr><tr><td data-num="2"></td><td><pre>hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><h2 id="font-stylecolor1dc0c9hexo主题配置文件font"><a class="anchor" href="#font-stylecolor1dc0c9hexo主题配置文件font">#</a> <font style="color:#1DC0C9">Hexo 主题配置文件</font></h2><p>建议将主题配置与主题代码进行分离，以便在更新主题时保持配置文件的独立性。具体的操作：</p><ul><li>1. 将 shokax 主题目录中的 _config.yml 文件复制到项目根目录，并重命名为 <font style="color:#DF2A3F">_config.shokax.yml</font>。</li><li>2. 后期直接修改根目录下的 _config.shokax.yml 文件，而无需更改主题目录当中的配置文件。</li><li>3. 这样，在未来更新主题时，配置文件不会受到影响，便于维护和管理。</li></ul><p>拷贝主题配置文件，后续更新主题相关内容，在 _config-shokax.yml 文件编</p><p>辑即可</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token builtin class-name">cd</span> /e/hexo-blog</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token function">cp</span> themes/shokax/_config.yml ./_config.shokax.yml</pre></td></tr></table></figure><h1 id="font-stylecolor1dc0c9shokax主题常规配置font"><a class="anchor" href="#font-stylecolor1dc0c9shokax主题常规配置font">#</a> <font style="color:#1DC0C9">shokax 主题常规配置</font></h1><h2 id="font-stylecolor1dc0c9站点标题font"><a class="anchor" href="#font-stylecolor1dc0c9站点标题font">#</a> <font style="color:#1DC0C9">站点标题</font></h2><p>1. 名称会显示在页面顶部，以及页尾</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>alternate：hexo-blog</pre></td></tr><tr><td data-num="4"></td><td><pre></pre></td></tr><tr><td data-num="5"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171240101.png" alt="image-20250417124004572"></p><h2 id="font-stylecolor1dc0c9夜间模式font"><a class="anchor" href="#font-stylecolor1dc0c9夜间模式font">#</a> <font style="color:#1DC0C9">夜间模式</font></h2><p>主题的右上角有一个白天与夜晚的模式切换，在不点击切换按钮的情况下，可以通过如下配置控制是否开启；</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 夜间模式</span></pre></td></tr><tr><td data-num="4"></td><td><pre>darkmode: <span class="token boolean">false</span>  <span class="token comment">#默认为 true 自动开启夜间模式（也就是晚上），个人不喜欢则设置为 false</span></pre></td></tr><tr><td data-num="5"></td><td><pre>auto_dark: <span class="token comment"># 自动亮 / 暗模式</span></pre></td></tr><tr><td data-num="6"></td><td><pre>  enable: <span class="token boolean">false</span> <span class="token comment">#是否开启</span></pre></td></tr><tr><td data-num="7"></td><td><pre>  start: <span class="token number">20</span> <span class="token comment">#开始时间晚上 8 点暗模式</span></pre></td></tr><tr><td data-num="8"></td><td><pre>  end: <span class="token number">7</span> <span class="token comment">#结束时间，早上 7 点亮模式</span></pre></td></tr></table></figure><h2 id="font-stylecolor1dc0c9自动定位font"><a class="anchor" href="#font-stylecolor1dc0c9自动定位font">#</a> <font style="color:#1DC0C9">自动定位</font></h2><p>自动定位指的的是，重新打开页面、或文章时，是否滚动到上次浏览的位置。false 表示停用，true 表示开启。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>auto_scroll: <span class="token boolean">false</span>  <span class="token comment">#默认为 false</span></pre></td></tr></table></figure><h2 id="font-stylecolor1dc0c9鼠标特效font"><a class="anchor" href="#font-stylecolor1dc0c9鼠标特效font">#</a> <font style="color:#1DC0C9">鼠标特效</font></h2><p>鼠标默认点击为烟花效果，具体配置如下</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>modules:</pre></td></tr><tr><td data-num="4"></td><td><pre>  player: <span class="token boolean">false</span> <span class="token comment"># 关闭音乐播放器</span></pre></td></tr><tr><td data-num="5"></td><td><pre>  fireworks: <span class="token boolean">false</span> <span class="token comment"># 关闭鼠标点击烟花特效</span></pre></td></tr></table></figure><h2 id="font-stylecolor1dc0c9文章赞赏font"><a class="anchor" href="#font-stylecolor1dc0c9文章赞赏font">#</a> <font style="color:#1DC0C9">文章赞赏</font></h2><p>可以将自己的微信、支付宝收款码等图片上传到主题路径 <code>E:\hexo-blog\themes\shokax\source\assets</code> 目录下，并在主题配置文件中启用和设置赞赏功能。</p><p>1. 下载对应的赞赏码至指定位置</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token builtin class-name">cd</span> /e/hexo-blog/themes/shokax/source/assets/</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token function">curl</span> <span class="token parameter variable">-o</span> alipay.png https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/alipay.png</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token function">curl</span> <span class="token parameter variable">-o</span> wechatpay.png https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/wechatpay.png</pre></td></tr></table></figure><p>2. 编辑主题配置文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ <span class="token function">vim</span> /e/hexo-blog/_config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 赞赏功能</span></pre></td></tr><tr><td data-num="4"></td><td><pre>reward:</pre></td></tr><tr><td data-num="5"></td><td><pre>  <span class="token comment"># If true, reward will be displayed in every article by default.</span></pre></td></tr><tr><td data-num="6"></td><td><pre>  enable: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="7"></td><td><pre>  account:</pre></td></tr><tr><td data-num="8"></td><td><pre>    wechatpay: /wechatpay.png</pre></td></tr><tr><td data-num="9"></td><td><pre>    alipay: /alipay.png</pre></td></tr><tr><td data-num="10"></td><td><pre>    <span class="token comment"># paypal: /paypal.png</span></pre></td></tr></table></figure><p>3. 检查结果</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ <span class="token builtin class-name">cd</span> /e/hexo-blog/</pre></td></tr><tr><td data-num="2"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171241054.png" alt="image-20250417124148827"></p><h2 id="font-stylecolor1dc0c9页面底部组件font"><a class="anchor" href="#font-stylecolor1dc0c9页面底部组件font">#</a> <font style="color:#1DC0C9">页面底部组件</font></h2><p>1. 目前页面底部可以显示两个小部件，即随机文章 和 最近评论 (默认都是开启的)</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>widgets:</pre></td></tr><tr><td data-num="4"></td><td><pre>  random_posts: <span class="token boolean">true</span>    <span class="token comment">#显示随机文章</span></pre></td></tr><tr><td data-num="5"></td><td><pre>  recent_comments: <span class="token boolean">true</span> <span class="token comment">#显示最近评论</span></pre></td></tr></table></figure><p>2. 检查结果</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171310237.png" alt="image-20250417131002052"></p><h2 id="font-stylecolor1dc0c9文章字数及阅读时间-备案font"><a class="anchor" href="#font-stylecolor1dc0c9文章字数及阅读时间-备案font">#</a> <font style="color:#1DC0C9">文章字数及阅读时间 备案</font></h2><p>1. 安装 <code>hexo-symbols-count-time</code> 插件 (貌似不安装也正常)。直接使用主题中默认提供的配置即可。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 文章界面统计 (字数 阅读时长) 大概在 288 行</span></pre></td></tr><tr><td data-num="4"></td><td><pre>post:</pre></td></tr><tr><td data-num="5"></td><td><pre>  count: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="6"></td><td><pre></pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token comment"># 页尾全站统计 (显示所有文章总字数) 大概在 266 行</span></pre></td></tr><tr><td data-num="8"></td><td><pre>footer:</pre></td></tr><tr><td data-num="9"></td><td><pre>  <span class="token comment"># Specify the date when the site was set up. If not defined, current year will be used.</span></pre></td></tr><tr><td data-num="10"></td><td><pre>  since: <span class="token number">2025</span>    <span class="token comment"># 此处需要修改</span></pre></td></tr><tr><td data-num="11"></td><td><pre>  icon:</pre></td></tr><tr><td data-num="12"></td><td><pre>    name: sakura rotate</pre></td></tr><tr><td data-num="13"></td><td><pre>    <span class="token comment"># Change the color of icon, using Hex Code.</span></pre></td></tr><tr><td data-num="14"></td><td><pre>    color: <span class="token string">"#ffc0cb"</span></pre></td></tr><tr><td data-num="15"></td><td><pre>  <span class="token comment"># Dependencies: https://github.com/theme-next/hexo-symbols-count-time</span></pre></td></tr><tr><td data-num="16"></td><td><pre>  count: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="17"></td><td><pre>  powered: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="18"></td><td><pre>  lantern:</pre></td></tr><tr><td data-num="19"></td><td><pre>    enable: <span class="token boolean">true</span> <span class="token comment">#是否开启</span></pre></td></tr><tr><td data-num="20"></td><td><pre>    word1: 中 <span class="token comment">#第一个字</span></pre></td></tr><tr><td data-num="21"></td><td><pre>    word2: 秋 <span class="token comment">#第二个字</span></pre></td></tr><tr><td data-num="22"></td><td><pre>  icp: <span class="token comment"># ICP 备案</span></pre></td></tr><tr><td data-num="23"></td><td><pre>    enable: <span class="token boolean">true</span>    <span class="token comment">#此处需要修改</span></pre></td></tr><tr><td data-num="24"></td><td><pre>    <span class="token comment"># 请在登录后从 https://beian.mps.gov.cn/web/business/businessHome/website 下载对应图标</span></pre></td></tr><tr><td data-num="25"></td><td><pre>    icon: <span class="token string">""</span> <span class="token comment">#网安备案图片</span></pre></td></tr><tr><td data-num="26"></td><td><pre>    icpnumber: <span class="token string">"xxx"</span> <span class="token comment"># ICP 备案号</span></pre></td></tr><tr><td data-num="27"></td><td><pre>    beian: <span class="token string">"xxx"</span> <span class="token comment"># 网安备案号</span></pre></td></tr><tr><td data-num="28"></td><td><pre>    recordcode: <span class="token string">"xxx"</span> <span class="token comment"># 网安备案链接中的 recordcode 参数</span></pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171242141.png" alt="image-20250417124215658"></p><h1 id="font-stylecolor1dc0c9shokax主题菜单配置font"><a class="anchor" href="#font-stylecolor1dc0c9shokax主题菜单配置font">#</a> <font style="color:#1DC0C9">shokax 主题菜单配置</font></h1><h2 id="font-stylecolor1dc0c9配置首页菜单栏按钮font"><a class="anchor" href="#font-stylecolor1dc0c9配置首页菜单栏按钮font">#</a> <font style="color:#1DC0C9">配置首页菜单栏按钮</font></h2><p>1. 在右上方页面显示 (首页、分类、标签、归档、关于) 等菜单栏 ，具体配置如下。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 菜单栏 home: 首页、archives: 归档、categories: 分类、tags: 标签、about: 关于、friends: 友链</span></pre></td></tr><tr><td data-num="4"></td><td><pre>menu:</pre></td></tr><tr><td data-num="5"></td><td><pre>  home: / <span class="token operator">||</span> home</pre></td></tr><tr><td data-num="6"></td><td><pre>  archives: /archives/ <span class="token operator">||</span> list-alt</pre></td></tr><tr><td data-num="7"></td><td><pre>  categories: /categories/ <span class="token operator">||</span> th</pre></td></tr><tr><td data-num="8"></td><td><pre>  tags: /tags/ <span class="token operator">||</span> tags</pre></td></tr><tr><td data-num="9"></td><td><pre>  about: /about/ <span class="token operator">||</span> about</pre></td></tr><tr><td data-num="10"></td><td><pre>  friends: /friends/ <span class="token operator">||</span> heart</pre></td></tr></table></figure><p>2. 查看结果</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171242030.png" alt="image-20250417124247769"></p><h2 id="font-stylecolor1dc0c9配置文章的分类与标签font"><a class="anchor" href="#font-stylecolor1dc0c9配置文章的分类与标签font">#</a> <font style="color:#1DC0C9">配置文章的分类与标签</font></h2><p>1. 新的文章可以通过在<font style="color:#DF2A3F">文章头部的元数据中，添加对应的属性，将文章归类到指定的分类和标签中。</font>同时，还可以为文章配置是否允许评论等功能。以下是常用的属性及其说明：</p><ul><li><code>title</code> ：文章的标题</li><li><code>categories</code> ：文章所属的分类</li><li><code>tags</code> ：文章的标签 (支持多个标签)</li><li><code>comments</code> ：是否允许评论，可设置为 <code>true</code> 或 <code>false</code></li></ul><p>只需在文章的 Front-Matter 中添加这些属性，即可完成分类、标签及其他相关配置。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> source/_posts/filebeat.md</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>---</pre></td></tr><tr><td data-num="4"></td><td><pre>title: Filebeat入门</pre></td></tr><tr><td data-num="5"></td><td><pre>categories:</pre></td></tr><tr><td data-num="6"></td><td><pre>  - ELK</pre></td></tr><tr><td data-num="7"></td><td><pre>  - filebeat</pre></td></tr><tr><td data-num="8"></td><td><pre>tags:</pre></td></tr><tr><td data-num="9"></td><td><pre>  - filebeat</pre></td></tr><tr><td data-num="10"></td><td><pre>  - 日志收集系统</pre></td></tr><tr><td data-num="11"></td><td><pre>comments: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="12"></td><td><pre>date: <span class="token number">2025</span>-03-15 01:00:00</pre></td></tr><tr><td data-num="13"></td><td><pre>updated: <span class="token number">2025</span>-03-15 01:00:00</pre></td></tr><tr><td data-num="14"></td><td><pre>---</pre></td></tr><tr><td data-num="15"></td><td><pre></pre></td></tr><tr><td data-num="16"></td><td><pre><span class="token comment"># Filebeat</span></pre></td></tr><tr><td data-num="17"></td><td><pre>  filebeat采集日志，并转发至ES</pre></td></tr></table></figure><p>2. 查看结果</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171244890.png" alt="image-20250417124407705"></p><h2 id="font-stylecolor1dc0c9配置关于本站页面font"><a class="anchor" href="#font-stylecolor1dc0c9配置关于本站页面font">#</a> <font style="color:#1DC0C9">配置关于本站页面</font></h2><p>1. 使用以下命令创建 About 页面的 Markdown 文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ hexo new page <span class="token string">"about"</span></pre></td></tr><tr><td data-num="2"></td><td><pre>INFO  Validating config</pre></td></tr><tr><td data-num="3"></td><td><pre>INFO  Created: E:<span class="token punctuation">\</span>hexo-blog<span class="token punctuation">\</span>source<span class="token punctuation">\</span>about<span class="token punctuation">\</span>index.md</pre></td></tr></table></figure><p>2. 编辑 <code>E:\hexo-blog\source\about\index.md</code> ，并<font style="color:#DF2A3F">注入关于本站相关的内容。</font></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ <span class="token function">vim</span> /e/hexo-blog/source/about/index.md</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>---</pre></td></tr><tr><td data-num="4"></td><td><pre>title: 关于本站</pre></td></tr><tr><td data-num="5"></td><td><pre>date: <span class="token number">2025</span>-03-15 <span class="token number">19</span>:00:07</pre></td></tr><tr><td data-num="6"></td><td><pre>comments: <span class="token boolean">true</span></pre></td></tr><tr><td data-num="7"></td><td><pre>---</pre></td></tr><tr><td data-num="8"></td><td><pre><span class="token comment">## 关于本站</span></pre></td></tr><tr><td data-num="9"></td><td><pre>* 欢迎来到我的播客:</pre></td></tr><tr><td data-num="10"></td><td><pre> - <span class="token number">2025</span>年使用hexo构建的网站，后续会持续更新内容，主要记录LinuxSre运维、云原生等相关内容。</pre></td></tr><tr><td data-num="11"></td><td><pre></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token comment">## 关于作者</span></pre></td></tr><tr><td data-num="13"></td><td><pre>LinuxLearner，持有OCP、RHCE 、CKA等证书，主要擅长 Linux、Shell、Nginx、Tomcat、JVM、Haproxy、</pre></td></tr><tr><td data-num="14"></td><td><pre>LVS、Keepalived、Zabbix、Ldap、Git、Jenkins、ELKStack、Ansible、SaltStack、Docker、Kubernetes、</pre></td></tr><tr><td data-num="15"></td><td><pre>Prometheus、Ceph等。并且在云平台架构，微服务架构等领域有较深入研究。</pre></td></tr><tr><td data-num="16"></td><td><pre></pre></td></tr><tr><td data-num="17"></td><td><pre><span class="token comment">## 我的故事</span></pre></td></tr><tr><td data-num="18"></td><td><pre>- 热爱技术分享。</pre></td></tr><tr><td data-num="19"></td><td><pre>- 专注于Linux运维、云原生等技术。</pre></td></tr><tr><td data-num="20"></td><td><pre>- 兴趣广泛: 阅读、音乐、旅行、动漫。</pre></td></tr></table></figure><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171245415.png" alt="image-20250417124513225"></p><h2 id="font-stylecolor1dc0c9配置友情链接页面font"><a class="anchor" href="#font-stylecolor1dc0c9配置友情链接页面font">#</a> <font style="color:#1DC0C9">配置友情链接页面</font></h2><p><font style="color:#DF2A3F">在友链的 Markdown 文件中，可以通过 links 标签块定义站点信息和显示样式。</font>以下是 links 标签块支持的参数配置：</p><table><thead><tr><th><strong>site</strong></th><th><strong>站点名称</strong></th><th><strong>必填</strong></th></tr></thead><tbody><tr><td>owner</td><td>管理员名字</td><td>可选，默认为 site 的值</td></tr><tr><td>url</td><td>站点链接</td><td>必填</td></tr><tr><td>desc</td><td>站点描述</td><td>可选，默认为 url 的值</td></tr><tr><td>image</td><td>站点图片</td><td>可选，默认为 images/404.png</td></tr><tr><td>color</td><td>方块颜色</td><td>可选，默认为 #666 <a target="_blank" rel="noopener" href="https://coolors.co">https://coolors.co</a></td></tr></tbody></table><p>1. 使用以下命令创建友链页面的 Markdown 文件:</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ hexo new page friends</pre></td></tr><tr><td data-num="2"></td><td><pre>INFO  Validating config</pre></td></tr><tr><td data-num="3"></td><td><pre>INFO  Created: E:<span class="token punctuation">\</span>hexo-blog<span class="token punctuation">\</span>source<span class="token punctuation">\</span>friends<span class="token punctuation">\</span>index.md</pre></td></tr></table></figure><p>2. 编辑 <code>source/friends/index.md</code> 文章，设定友链内容</p><figure class="highlight yaml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># 本站信息</span></pre></td></tr><tr><td data-num="2"></td><td><pre>* 站名： LinuxLearner <span class="token punctuation">-</span> LinuxSre云原生</pre></td></tr><tr><td data-num="3"></td><td><pre>* 站⻓： LinuxLearner</pre></td></tr><tr><td data-num="4"></td><td><pre>* 地址： http<span class="token punctuation">:</span>//blog.zhanglongfei.cloud</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment"># 申请方法</span></pre></td></tr><tr><td data-num="7"></td><td><pre>* 添加本站后，在本页留言，格式如下</pre></td></tr><tr><td data-num="8"></td><td><pre></pre></td></tr><tr><td data-num="9"></td><td><pre><span class="token punctuation">-</span> <span class="token key atrule">site</span><span class="token punctuation">:</span>  <span class="token comment"># 网站的名字</span></pre></td></tr><tr><td data-num="10"></td><td><pre>  <span class="token key atrule">owner</span><span class="token punctuation">:</span> <span class="token comment"># 您的名字</span></pre></td></tr><tr><td data-num="11"></td><td><pre>  <span class="token key atrule">url</span><span class="token punctuation">:</span>   <span class="token comment"># 您的网址</span></pre></td></tr><tr><td data-num="12"></td><td><pre>  <span class="token key atrule">desc</span><span class="token punctuation">:</span>  <span class="token comment"># 简短描述</span></pre></td></tr><tr><td data-num="13"></td><td><pre>  <span class="token key atrule">image</span><span class="token punctuation">:</span> <span class="token comment"># 一张图片</span></pre></td></tr><tr><td data-num="14"></td><td><pre>  <span class="token key atrule">color</span><span class="token punctuation">:</span> <span class="token comment"># 方块颜色</span></pre></td></tr></table></figure><figure class="highlight yaml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># 友链的伙伴们</span></pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token punctuation">-</span> <span class="token key atrule">site</span><span class="token punctuation">:</span> Fomalhaut🥝</pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">owner</span><span class="token punctuation">:</span> Fomalhaut🥝</pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//fomal.cc/</pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">desc</span><span class="token punctuation">:</span> Future is now 🍭🍭🍭</pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">image</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//source.fomal.cc/siteshot/www.fomal.cn.jpg</pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">color</span><span class="token punctuation">:</span> <span class="token string">"#e9546b"</span></pre></td></tr><tr><td data-num="9"></td><td><pre> </pre></td></tr><tr><td data-num="10"></td><td><pre><span class="token punctuation">-</span> <span class="token key atrule">site</span><span class="token punctuation">:</span> 技术支持</pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">owner</span><span class="token punctuation">:</span> Hexo </pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//hexo.io/zh<span class="token punctuation">-</span>cn/</pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">desc</span><span class="token punctuation">:</span> 快速、简单且强大的网志框架</pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token key atrule">image</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//source.fomal.cc/siteshot/hexo.io.jpg</pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">color</span><span class="token punctuation">:</span> <span class="token string">"#9d5b8b"</span></pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171502831.png" alt="image-20250417150256636"></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171421551.png" alt="image-20250417142121327"></p><h1 id="font-stylecolor1dc0c9shokax主题页面配置font"><a class="anchor" href="#font-stylecolor1dc0c9shokax主题页面配置font">#</a> <font style="color:#1DC0C9">shokax 主题页面配置</font></h1><h2 id="font-stylecolor1dc0c9自定义主题背景font"><a class="anchor" href="#font-stylecolor1dc0c9自定义主题背景font">#</a> <font style="color:#1DC0C9">自定义主题背景</font></h2><p>1. 默认的背景是随机的，因此我们可以自行设定。( 渐变色网站： <a target="_blank" rel="noopener" href="https://coolbackgrouds.io">https://coolbackgrouds.io</a> )</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># 提前准备好对应的背景图⽚</span></pre></td></tr><tr><td data-num="2"></td><td><pre>https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/cool-background.png</pre></td></tr></table></figure><p>2. 编辑主题配置文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 首页背景图</span></pre></td></tr><tr><td data-num="4"></td><td><pre>homeConfig:</pre></td></tr><tr><td data-num="5"></td><td><pre>  gradient: <span class="token boolean">false</span> <span class="token comment"># 使用 CSS 渐变作为文章封面</span></pre></td></tr><tr><td data-num="6"></td><td><pre>  <span class="token comment"># fixedCover 性能比默认的更好，且开启时将启用 LCP 优化和预加载 TODO</span></pre></td></tr><tr><td data-num="7"></td><td><pre>  fixedCover: <span class="token string">"https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/cool-background.png"</span> <span class="token comment"># 主页面 cover (为空则使用 bing 随机图片)</span></pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171250552.png" alt="image-20250417125009332"></p><h2 id="font-stylecolor1dc0c9自定义文章封面font"><a class="anchor" href="#font-stylecolor1dc0c9自定义文章封面font">#</a> <font style="color:#1DC0C9">自定义文章封面</font></h2><p>由于官方提供的文章图片可能无法正常访问，请自行准备对应的图片，<font style="color:#DF2A3F">并将主题中_images-yml 配置文件中的图片 URL 替换为自定义的图片 URL。</font></p><p>1. 编辑主题的 _images-yml 配置文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> /e/hexo-blog/themes/shokax/_images.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_1.webp</pre></td></tr><tr><td data-num="4"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_2.webp</pre></td></tr><tr><td data-num="5"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_3.webp</pre></td></tr><tr><td data-num="6"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_4.webp</pre></td></tr><tr><td data-num="7"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_5.webp</pre></td></tr><tr><td data-num="8"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_6.webp</pre></td></tr><tr><td data-num="9"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_7.webp</pre></td></tr><tr><td data-num="10"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_8.webp</pre></td></tr><tr><td data-num="11"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_9.webp</pre></td></tr><tr><td data-num="12"></td><td><pre>- https://zhanglongfei.cloud/pic/default_cover_10.webp</pre></td></tr></table></figure><p>2. 检查结果显示，每篇文章会随时使用这些图片作为文章的封面展示</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171250918.png" alt="image-20250417125041630"></p><p>3. 如果想<font style="color:#DF2A3F">自定义文章封面</font>，则可以在编辑文章时，通过元数据信息设置 <code>cover: image path</code> 字段，则封面会显示自定义的图片。</p><figure class="highlight yaml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> Images</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">cover</span><span class="token punctuation">:</span> assets/xx_img.jpg  <span class="token comment">#需要将图片放置在 shokax/source/assets/ 目录下，尺寸 350x150 </span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token comment"># 或者写出</span></pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token key atrule">cover</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//zlf<span class="token punctuation">-</span>blog.oss<span class="token punctuation">-</span>cn<span class="token punctuation">-</span>hangzhou.aliyuncs.com/pic/default_cover_5.webp  <span class="token comment">#通过互联网 Url 获取访问，尺寸</span></pre></td></tr><tr><td data-num="6"></td><td><pre>350x150</pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token punctuation">---</span></pre></td></tr></table></figure><figure class="highlight yaml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> Filebeat入门</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">cover</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//zlf<span class="token punctuation">-</span>blog.oss<span class="token punctuation">-</span>cn<span class="token punctuation">-</span>hangzhou.aliyuncs.com/pic/default_cover_5.webp</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">categories</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre>  <span class="token punctuation">-</span> ELK</pre></td></tr><tr><td data-num="6"></td><td><pre>  <span class="token punctuation">-</span> filebeat</pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token key atrule">tags</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="8"></td><td><pre>  <span class="token punctuation">-</span> filebeat</pre></td></tr><tr><td data-num="9"></td><td><pre>  <span class="token punctuation">-</span> 日志收集系统</pre></td></tr><tr><td data-num="10"></td><td><pre><span class="token key atrule">comments</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="11"></td><td><pre><span class="token key atrule">abbrlink</span><span class="token punctuation">:</span> <span class="token number">804899506</span></pre></td></tr><tr><td data-num="12"></td><td><pre><span class="token key atrule">date</span><span class="token punctuation">:</span> <span class="token datetime number">2025-03-15 01:00:00</span></pre></td></tr><tr><td data-num="13"></td><td><pre><span class="token key atrule">updated</span><span class="token punctuation">:</span> <span class="token datetime number">2025-03-15 01:00:00</span></pre></td></tr><tr><td data-num="14"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="15"></td><td><pre></pre></td></tr><tr><td data-num="16"></td><td><pre><span class="token comment"># Filebeat</span></pre></td></tr><tr><td data-num="17"></td><td><pre>  filebeat采集日志，并转发至ES</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171251190.png" alt="image-20250417125124881"></p><h2 id="font-stylecolor1dc0c9配置导航栏图标font"><a class="anchor" href="#font-stylecolor1dc0c9配置导航栏图标font">#</a> <font style="color:#1DC0C9">配置导航栏图标</font></h2><p>导航栏 ico 图标 ，图标设计网站： <code>https://favicon.io</code></p><p>1. 下载准备好 ico</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/favicon0315.ico</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>图片存放到 E:<span class="token punctuation">\</span>hexo-blog<span class="token punctuation">\</span>themes<span class="token punctuation">\</span>shokax<span class="token punctuation">\</span>source<span class="token punctuation">\</span>assets  并命名为favicon.ico</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171252908.png" alt="image-20250417125210720"></p><p>2. 编辑主题配置文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>icon:</pre></td></tr><tr><td data-num="4"></td><td><pre>  favicon: <span class="token string">"/favicon.ico"</span> <span class="token comment"># 首页显示图标</span></pre></td></tr><tr><td data-num="5"></td><td><pre>  apple_touch_icon: <span class="token string">"/favicon.ico"</span> <span class="token comment"># 当用户将网站添加到主屏幕时显示的图标，专为苹果设备定义</span></pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171252409.png" alt="image-20250417125259172"></p><h2 id="font-stylecolor1dc0c9配置边栏logofont"><a class="anchor" href="#font-stylecolor1dc0c9配置边栏logofont">#</a> <font style="color:#1DC0C9">配置边栏 Logo</font></h2><p>首页边栏个人图片默认无法显示，因此需要提供一张图片进行展示。 <code>https://favicon.io/</code></p><p>1. 下载准备好的图片</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/head.jpg</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment">#windows 方式</span></pre></td></tr><tr><td data-num="4"></td><td><pre>图片存放到 E:<span class="token punctuation">\</span>hexo-blog<span class="token punctuation">\</span>themes<span class="token punctuation">\</span>shokax<span class="token punctuation">\</span>source<span class="token punctuation">\</span>assets  并命名为avatar.jpg</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment">#linux 方式</span></pre></td></tr><tr><td data-num="7"></td><td><pre>$ <span class="token builtin class-name">cd</span> /e/hexo-blog/themes/shokax/source/assets</pre></td></tr><tr><td data-num="8"></td><td><pre>$ <span class="token function">curl</span> <span class="token parameter variable">-o</span> avatar.jpg https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/pic/head.jpg</pre></td></tr></table></figure><p>2. 编辑主题配置文件</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 边栏设置</span></pre></td></tr><tr><td data-num="4"></td><td><pre>sidebar:</pre></td></tr><tr><td data-num="5"></td><td><pre>  position: left     <span class="token comment"># left 表示左侧显示边栏、right 表示右侧显示边栏</span></pre></td></tr><tr><td data-num="6"></td><td><pre>  avatar: avatar.jpg <span class="token comment"># 本地边栏图片名称</span></pre></td></tr></table></figure><p>3. 检查结果</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>$ <span class="token builtin class-name">cd</span> /e/hexo-blog/</pre></td></tr><tr><td data-num="2"></td><td><pre>$ hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171253252.png" alt="image-20250417125353957"></p><h2 id="font-stylecolor1dc0c9配置边栏社交font"><a class="anchor" href="#font-stylecolor1dc0c9配置边栏社交font">#</a> <font style="color:#1DC0C9">配置边栏社交</font></h2><p>在左侧的边栏下面还可以配置一些社交相关的链接。</p><p>1. 修改配置</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 社交相关链接 (使用 || 作为分隔符，依次为链接 || 图标 || 颜色)</span></pre></td></tr><tr><td data-num="4"></td><td><pre>social:</pre></td></tr><tr><td data-num="5"></td><td><pre>  github: https://github.com/longfeizhang163 <span class="token operator">||</span> github <span class="token operator">||</span> <span class="token string">"#191717"</span></pre></td></tr><tr><td data-num="6"></td><td><pre>  email: mailto:zlf1570380578@163.com <span class="token operator">||</span> envelope <span class="token operator">||</span> <span class="token string">"#55acd5"</span></pre></td></tr></table></figure><p>2. 检查结果</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171254404.png" alt="image-20250417125418083"></p><h1 id="font-stylecolor1dc0c9shokax主题接入评论系统walinefont"><a class="anchor" href="#font-stylecolor1dc0c9shokax主题接入评论系统walinefont">#</a> <font style="color:#1DC0C9">shokax 主题接入评论系统 Waline</font></h1><h2 id="font-stylecolor1dc0c9注册waline评论系统font"><a class="anchor" href="#font-stylecolor1dc0c9注册waline评论系统font">#</a> <font style="color:#1DC0C9">注册 waline 评论系统</font></h2><p>1. 访问 <code>https://waline.js.org</code> ， 点击快速上手</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171254534.png" alt="image-20250417125444346"></p><p>2.<a target="_blank" rel="noopener" href="https://console.leancloud.app/register"> 注册</a> <code>LeanCloud国际版</code> 并进入 控制台 ，然后点击左上角创建应用并起一个名称 (选择免费的开发版)</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171255901.png" alt="image-20250417125504728"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171255100.png" alt="image-20250417125525928"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171255594.png" alt="image-20250417125539414"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171256441.png" alt="image-20250417125607253"></p><p>3. 进入应用，选择左下角的 <code>设置</code> &gt; <code>应用key</code> 可以看到 <code>APP ID APP Key Master Key</code> 、 服务器地址，记录它们，以便后续部署时使用。</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171256583.png" alt="image-20250417125632394"></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>LEAN_ID  AerGrfvATzJNruVKovDmZ7ID-MdYXbMMI</pre></td></tr><tr><td data-num="2"></td><td><pre>LEAN_KEY yhJZlX0Vj2j7ZSZP3eMldjtY</pre></td></tr><tr><td data-num="3"></td><td><pre>LEAN_MASTER_KEY 4CHUFlkAw48w9PubGRepxspW</pre></td></tr><tr><td data-num="4"></td><td><pre>https://aergrfva.api.lncldglobal.com</pre></td></tr></table></figure><h2 id="font-stylecolor1dc0c9部署waline服务端font"><a class="anchor" href="#font-stylecolor1dc0c9部署waline服务端font">#</a> <font style="color:#1DC0C9">部署 waline 服务端</font></h2><p>1.waline 服务端可以通过 vercel 线上部署，访问 <code>https://waline.js.org/guide/deploy/vercel.html</code> 然后点击 Deploy 部署按钮</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171257074.png" alt="image-20250417125702858"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171257960.png" alt="image-20250417125728674"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171257958.png" alt="image-20250417125748749"></p><p>创建完成点击继续</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171259710.png" alt="image-20250417125910506"></p><p>3. 找到项目的 <code>Settings</code> &gt; <code>Environment Variables</code> 进入环境变量配置页，并配置三个环境变量</p><ul><li><code>LEAN_ID</code> : 对应 LeanCloud 中的 APP ID</li><li><code>LEAN_KEY</code> : 对应 LeanCloud 中的 APP KEY</li><li><code>LEAN_MASTER_KE</code> : 对应 LeanCloud 中的 Master Key</li></ul><p>最后点击 Save 保存。</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171259487.png" alt="image-20250417125950279"></p><p>4. 登录到 github 上查看刚创建的 hexo-blog</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171300965.png" alt="image-20250417130009769"></p><p>5. 最后点击 Deployments--&gt;Redeploy 重新部署项目</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171300651.png" alt="image-20250417130026460"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171300946.png" alt="image-20250417130046755"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171301982.png" alt="image-20250417130101802"></p><p>5. 试评论系统功能是否正常 <a target="_blank" rel="noopener" href="https://hexo-blog-lilac-two.vercel.app/">https://hexo-blog-lilac-two.vercel.app</a></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171301150.png" alt="image-20250417130120968"></p><p>6. 点击 Settings--&gt;Domains ，复制服务的后端地址 hexo-blog-lilac-two.vercel.app</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171302915.png" alt="image-20250417130204717"></p><h2 id="font-stylecolor1dc0c9配置主题对接walinefont"><a class="anchor" href="#font-stylecolor1dc0c9配置主题对接walinefont">#</a> <font style="color:#1DC0C9">配置主题对接 waline</font></h2><p>1. 编辑主题配置</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> _config.shokax.yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 评论系统</span></pre></td></tr><tr><td data-num="4"></td><td><pre>waline:</pre></td></tr><tr><td data-num="5"></td><td><pre>  enable: <span class="token boolean">true</span>  <span class="token comment"># 启用 waline 评论系统</span></pre></td></tr><tr><td data-num="6"></td><td><pre>  serverURL: <span class="token string">"https://hexo-blog-lilac-two.vercel.app/"</span></pre></td></tr><tr><td data-num="7"></td><td><pre>  lang: <span class="token string">"zh-CN"</span></pre></td></tr><tr><td data-num="8"></td><td><pre>  locale: <span class="token punctuation">&#123;</span><span class="token punctuation">&#125;</span> <span class="token comment"># https://waline.js.org/guide/features/i18n.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%AD%E8%A8%80</span></pre></td></tr><tr><td data-num="9"></td><td><pre>  emoji: <span class="token comment"># 表情包</span></pre></td></tr><tr><td data-num="10"></td><td><pre>    - https://unpkg.com/@waline/emojis@1.0.1/weibo</pre></td></tr><tr><td data-num="11"></td><td><pre>    - https://unpkg.com/@waline/emojis@1.0.1/alus</pre></td></tr><tr><td data-num="12"></td><td><pre>    - https://unpkg.com/@waline/emojis@1.0.1/bilibili</pre></td></tr><tr><td data-num="13"></td><td><pre>    - https://unpkg.com/@waline/emojis@1.0.1/qq</pre></td></tr><tr><td data-num="14"></td><td><pre>    - https://unpkg.com/@waline/emojis@1.0.1/tieba</pre></td></tr><tr><td data-num="15"></td><td><pre>    - https://unpkg.com/@waline/emojis@1.0.1/tw-emoji</pre></td></tr><tr><td data-num="16"></td><td><pre>  meta: <span class="token comment"># 可以填写的内容 (昵称、邮箱、网址）</span></pre></td></tr><tr><td data-num="17"></td><td><pre>    - nick</pre></td></tr><tr><td data-num="18"></td><td><pre>    - mail</pre></td></tr><tr><td data-num="19"></td><td><pre>    - <span class="token function">link</span></pre></td></tr><tr><td data-num="20"></td><td><pre>  requiredMeta: <span class="token comment"># 必须填写的内容 (昵称、邮箱)</span></pre></td></tr><tr><td data-num="21"></td><td><pre>    - nick</pre></td></tr><tr><td data-num="22"></td><td><pre>    - mail</pre></td></tr><tr><td data-num="23"></td><td><pre>  wordLimit: <span class="token number">200</span> <span class="token comment"># 字数限制，0 为不限制</span></pre></td></tr><tr><td data-num="24"></td><td><pre>  pageSize: <span class="token number">10</span> <span class="token comment"># 每页评论条数</span></pre></td></tr><tr><td data-num="25"></td><td><pre>  pageview: <span class="token boolean">true</span> <span class="token comment"># 是否开启浏览量统计，可独立开启</span></pre></td></tr></table></figure><p>2. 要确保文章支持评论功能，需要在文章的元数据中添加 comments 字段并</p><p>设置为 true 示例：</p><figure class="highlight yaml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> Filebeat入门</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">cover</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//zlf<span class="token punctuation">-</span>blog.oss<span class="token punctuation">-</span>cn<span class="token punctuation">-</span>hangzhou.aliyuncs.com/pic/default_cover_5.webp</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">categories</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre>  <span class="token punctuation">-</span> ELK</pre></td></tr><tr><td data-num="6"></td><td><pre>  <span class="token punctuation">-</span> filebeat</pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token key atrule">tags</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="8"></td><td><pre>  <span class="token punctuation">-</span> filebeat</pre></td></tr><tr><td data-num="9"></td><td><pre>  <span class="token punctuation">-</span> 日志收集系统</pre></td></tr><tr><td data-num="10"></td><td><pre><span class="token key atrule">comments</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>  <span class="token comment"># 启用评论</span></pre></td></tr><tr><td data-num="11"></td><td><pre><span class="token key atrule">abbrlink</span><span class="token punctuation">:</span> <span class="token number">804899506</span></pre></td></tr><tr><td data-num="12"></td><td><pre><span class="token key atrule">date</span><span class="token punctuation">:</span> <span class="token datetime number">2025-03-15 01:00:00</span></pre></td></tr><tr><td data-num="13"></td><td><pre><span class="token key atrule">updated</span><span class="token punctuation">:</span> <span class="token datetime number">2025-03-15 01:00:00</span></pre></td></tr><tr><td data-num="14"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="15"></td><td><pre></pre></td></tr><tr><td data-num="16"></td><td><pre><span class="token comment"># Filebeat</span></pre></td></tr><tr><td data-num="17"></td><td><pre>  filebeat采集日志，并转发至ES</pre></td></tr></table></figure><p>3. 访问站点，验证评论系统是否可用。 <a target="_blank" rel="noopener" href="https://hexo-blog-lilac-two.vercel.app/">https://hexo-blog-lilac-two.vercel.app</a> 保证网络能防止这个网站 才能评论成功</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171304993.png" alt="image-20250417130434803"></p><h1 id="font-stylecolor1dc0c9shokax主题接入搜索系统algoliafont"><a class="anchor" href="#font-stylecolor1dc0c9shokax主题接入搜索系统algoliafont">#</a> <font style="color:#1DC0C9">shokax 主题接入搜索系统 Algolia</font></h1><h2 id="font-stylecolor1dc0c9注册algolia并完成配置font"><a class="anchor" href="#font-stylecolor1dc0c9注册algolia并完成配置font">#</a> <font style="color:#1DC0C9">注册 Algolia 并完成配置</font></h2><p>1. 登录 Algolia 官网，<a target="_blank" rel="noopener" href="https://www.algolia.com">https://www.algolia.com</a> 使用 Github 账号注册登录，然后进入 Dashboard －Search －Index 页面，选择 lndex --&gt;Create 创建索弓 l，设定索引名称 hexo-o-blog-search</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171305155.png" alt="image-20250417130532947"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171305252.png" alt="image-20250417130552049"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171306448.png" alt="image-20250417130611250"></p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171306450.png" alt="image-20250417130624251"></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>Application ID  1FDC68CS32</pre></td></tr><tr><td data-num="2"></td><td><pre>Search API Key  8bfe3192938561920555b1261dd420f1</pre></td></tr><tr><td data-num="3"></td><td><pre>Admin API Key   f8451abf613d9d8460fe4973f241ea06</pre></td></tr><tr><td data-num="4"></td><td><pre>索引名称: hexo-blog-search</pre></td></tr></table></figure><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171306928.png" alt="image-20250417130637316"></p><h2 id="font-stylecolor1dc0c9配置hexo对接algoliafont"><a class="anchor" href="#font-stylecolor1dc0c9配置hexo对接algoliafont">#</a> <font style="color:#1DC0C9">配置 Hexo 对接 Algolia</font></h2><p>1. 在 hexo 根目录 <code>_config-yml</code> 中加入如下内容，<font style="color:#DF2A3F">不要添加错了配置文件</font></p><figure class="highlight yaml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre>vim _config<span class="token punctuation">-</span>yml</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 搜索功能</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">algolia</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre>  <span class="token key atrule">appId</span><span class="token punctuation">:</span> 1FDC68CS32</pre></td></tr><tr><td data-num="6"></td><td><pre>  <span class="token key atrule">apiKey</span><span class="token punctuation">:</span> 8bfe3192938561920555b1261dd420f1</pre></td></tr><tr><td data-num="7"></td><td><pre>  <span class="token key atrule">adminApiKey</span><span class="token punctuation">:</span> f8451abf613d9d8460fe4973f241ea06</pre></td></tr><tr><td data-num="8"></td><td><pre>  <span class="token key atrule">chunkSize</span><span class="token punctuation">:</span> <span class="token number">5000</span></pre></td></tr><tr><td data-num="9"></td><td><pre>  <span class="token key atrule">indexName</span><span class="token punctuation">:</span> <span class="token string">"hexo-blog-search"</span>	<span class="token comment"># 索引名称</span></pre></td></tr><tr><td data-num="10"></td><td><pre>  <span class="token key atrule">fields</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="11"></td><td><pre>    <span class="token punctuation">-</span> title 				<span class="token comment"># 必须配置</span></pre></td></tr><tr><td data-num="12"></td><td><pre>    <span class="token punctuation">-</span> path 					<span class="token comment"># 必须配置</span></pre></td></tr><tr><td data-num="13"></td><td><pre>    <span class="token punctuation">-</span> categories		<span class="token comment"># 推荐配置</span></pre></td></tr><tr><td data-num="14"></td><td><pre>    <span class="token punctuation">-</span> content<span class="token punctuation">:</span>strip<span class="token punctuation">:</span>truncate<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">2000</span></pre></td></tr><tr><td data-num="15"></td><td><pre>    <span class="token punctuation">-</span> gallery</pre></td></tr><tr><td data-num="16"></td><td><pre>    <span class="token punctuation">-</span> photos</pre></td></tr><tr><td data-num="17"></td><td><pre>    <span class="token punctuation">-</span> tags</pre></td></tr></table></figure><p>2. 运行如下命令，上传索引。(注意：后续每次更新文章都需要更新下索引，确保索引是最新状态)</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>hexo algolia <span class="token operator">&amp;&amp;</span> hexo clean <span class="token operator">&amp;&amp;</span> hexo server</pre></td></tr></table></figure><p>3. 在 Algolia 的 Dashboard - Search - Index 页面中查看是否有索引内</p><p>容建立。</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171307678.png" alt="image-20250417130735469"></p><p>4. 回到网站测试搜索功能</p><p><img loading="lazy" data-src="https://zlf-blog.oss-cn-hangzhou.aliyuncs.com/2025/04/202504171307865.png" alt="image-20250417130750559"></p><div class="tags"><a href="/tags/Hexo%E4%B8%BB%E9%A2%98%E5%AE%89%E8%A3%85%E5%8F%8A%E9%85%8D%E7%BD%AE/" rel="tag"><i class="ic i-tag"></i>Hexo主题安装及配置</a></div></div><footer><div class="meta"><span class="icon"><i class="ic i-eye"></i></span><span>此文章已被阅读次数:</span><span class="waline-pageview-count" id="twikoo_visitors" data-path="/posts/1378412876.html">正在加载...</span><span class="item"><span class="icon"><i class="ic i-calendar-check"></i></span><span class="text">更新于</span><time title="修改时间：2025-04-19 23:47:25" itemprop="dateModified" datetime="2025-04-19T23:47:25+08:00">2025-04-19</time></span></div><div class="reward"><button><i class="ic i-heartbeat"></i>赞赏</button><p>请我喝[茶]~(￣▽￣)~*</p><div id="qr"><div><img loading="lazy" data-src="/assets/wechatpay.png" alt="LinuxLearner 微信支付"><p>微信支付</p></div><div><img loading="lazy" data-src="/assets/alipay.png" alt="LinuxLearner 支付宝"><p>支付宝</p></div></div></div><div id="copyright"><ul><li class="author"><strong>本文作者：</strong>LinuxLearner<i class="ic i-at"><em>@</em></i>LinuxSre云原生</li><li class="link"><strong>本文链接：</strong><a href="http://blog.zhanglongfei.cloud/posts/1378412876.html" title="Hexo主题安装及配置">http://blog.zhanglongfei.cloud/posts/1378412876.html</a></li><li class="license"><strong>版权声明：</strong>本站所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh"><i class="ic i-creative-commons"><em>(CC)</em></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li></ul></div></footer></article></div><div class="post-nav"><div class="item left"><a href="/posts/3617638497.html" rel="prev" itemprop="url" data-background-image="https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;mw690&#x2F;6833939bly1gicit4jrvuj20zk0m8785.jpg" title="Hexo配置及迁移"><span class="type">上一篇</span><span class="category"><i class="ic i-flag"></i>Hexo</span><h3>Hexo配置及迁移</h3></a></div><div class="item right"><a href="/posts/3061789372.html" rel="next" itemprop="url" data-background-image="https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;mw690&#x2F;6833939bly1gicit31ffoj20zk0m8naf.jpg" title="Hexo项目自动部署"><span class="type">下一篇</span><span class="category"><i class="ic i-flag"></i>Hexo</span><h3>Hexo项目自动部署</h3></a></div></div><div class="wrap" id="comments"></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#font-stylecolor1dc0c9hexo%E4%B8%BB%E9%A2%98%E5%AE%89%E8%A3%85font"><span class="toc-number">1.</span> <span class="toc-text">Hexo 主题安装</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9hexo%E4%B8%BB%E9%A2%98%E5%AE%89%E8%A3%85font-2"><span class="toc-number">1.1.</span> <span class="toc-text">Hexo 主题安装</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9hexo%E4%B8%BB%E9%A2%98%E7%AE%80%E5%8D%95%E9%85%8D%E7%BD%AEfont"><span class="toc-number">1.2.</span> <span class="toc-text">Hexo 主题简单配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9hexo%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6font"><span class="toc-number">1.3.</span> <span class="toc-text">Hexo 主题配置文件</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-stylecolor1dc0c9shokax%E4%B8%BB%E9%A2%98%E5%B8%B8%E8%A7%84%E9%85%8D%E7%BD%AEfont"><span class="toc-number">2.</span> <span class="toc-text">shokax 主题常规配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E7%AB%99%E7%82%B9%E6%A0%87%E9%A2%98font"><span class="toc-number">2.1.</span> <span class="toc-text">站点标题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E5%A4%9C%E9%97%B4%E6%A8%A1%E5%BC%8Ffont"><span class="toc-number">2.2.</span> <span class="toc-text">夜间模式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E8%87%AA%E5%8A%A8%E5%AE%9A%E4%BD%8Dfont"><span class="toc-number">2.3.</span> <span class="toc-text">自动定位</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%BC%A0%E6%A0%87%E7%89%B9%E6%95%88font"><span class="toc-number">2.4.</span> <span class="toc-text">鼠标特效</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E6%96%87%E7%AB%A0%E8%B5%9E%E8%B5%8Ffont"><span class="toc-number">2.5.</span> <span class="toc-text">文章赞赏</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%A1%B5%E9%9D%A2%E5%BA%95%E9%83%A8%E7%BB%84%E4%BB%B6font"><span class="toc-number">2.6.</span> <span class="toc-text">页面底部组件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E6%96%87%E7%AB%A0%E5%AD%97%E6%95%B0%E5%8F%8A%E9%98%85%E8%AF%BB%E6%97%B6%E9%97%B4-%E5%A4%87%E6%A1%88font"><span class="toc-number">2.7.</span> <span class="toc-text">文章字数及阅读时间 备案</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-stylecolor1dc0c9shokax%E4%B8%BB%E9%A2%98%E8%8F%9C%E5%8D%95%E9%85%8D%E7%BD%AEfont"><span class="toc-number">3.</span> <span class="toc-text">shokax 主题菜单配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E9%A6%96%E9%A1%B5%E8%8F%9C%E5%8D%95%E6%A0%8F%E6%8C%89%E9%92%AEfont"><span class="toc-number">3.1.</span> <span class="toc-text">配置首页菜单栏按钮</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E6%96%87%E7%AB%A0%E7%9A%84%E5%88%86%E7%B1%BB%E4%B8%8E%E6%A0%87%E7%AD%BEfont"><span class="toc-number">3.2.</span> <span class="toc-text">配置文章的分类与标签</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E5%85%B3%E4%BA%8E%E6%9C%AC%E7%AB%99%E9%A1%B5%E9%9D%A2font"><span class="toc-number">3.3.</span> <span class="toc-text">配置关于本站页面</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E5%8F%8B%E6%83%85%E9%93%BE%E6%8E%A5%E9%A1%B5%E9%9D%A2font"><span class="toc-number">3.4.</span> <span class="toc-text">配置友情链接页面</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-stylecolor1dc0c9shokax%E4%B8%BB%E9%A2%98%E9%A1%B5%E9%9D%A2%E9%85%8D%E7%BD%AEfont"><span class="toc-number">4.</span> <span class="toc-text">shokax 主题页面配置</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%A2%98%E8%83%8C%E6%99%AFfont"><span class="toc-number">4.1.</span> <span class="toc-text">自定义主题背景</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E8%87%AA%E5%AE%9A%E4%B9%89%E6%96%87%E7%AB%A0%E5%B0%81%E9%9D%A2font"><span class="toc-number">4.2.</span> <span class="toc-text">自定义文章封面</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E5%AF%BC%E8%88%AA%E6%A0%8F%E5%9B%BE%E6%A0%87font"><span class="toc-number">4.3.</span> <span class="toc-text">配置导航栏图标</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E8%BE%B9%E6%A0%8Flogofont"><span class="toc-number">4.4.</span> <span class="toc-text">配置边栏 Logo</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E8%BE%B9%E6%A0%8F%E7%A4%BE%E4%BA%A4font"><span class="toc-number">4.5.</span> <span class="toc-text">配置边栏社交</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-stylecolor1dc0c9shokax%E4%B8%BB%E9%A2%98%E6%8E%A5%E5%85%A5%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9Fwalinefont"><span class="toc-number">5.</span> <span class="toc-text">shokax 主题接入评论系统 Waline</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E6%B3%A8%E5%86%8Cwaline%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9Ffont"><span class="toc-number">5.1.</span> <span class="toc-text">注册 waline 评论系统</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%83%A8%E7%BD%B2waline%E6%9C%8D%E5%8A%A1%E7%AB%AFfont"><span class="toc-number">5.2.</span> <span class="toc-text">部署 waline 服务端</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AE%E4%B8%BB%E9%A2%98%E5%AF%B9%E6%8E%A5walinefont"><span class="toc-number">5.3.</span> <span class="toc-text">配置主题对接 waline</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-stylecolor1dc0c9shokax%E4%B8%BB%E9%A2%98%E6%8E%A5%E5%85%A5%E6%90%9C%E7%B4%A2%E7%B3%BB%E7%BB%9Falgoliafont"><span class="toc-number">6.</span> <span class="toc-text">shokax 主题接入搜索系统 Algolia</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E6%B3%A8%E5%86%8Calgolia%E5%B9%B6%E5%AE%8C%E6%88%90%E9%85%8D%E7%BD%AEfont"><span class="toc-number">6.1.</span> <span class="toc-text">注册 Algolia 并完成配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-stylecolor1dc0c9%E9%85%8D%E7%BD%AEhexo%E5%AF%B9%E6%8E%A5algoliafont"><span class="toc-number">6.2.</span> <span class="toc-text">配置 Hexo 对接 Algolia</span></a></li></ol></li></ol></div><div class="related panel pjax" data-title="系列文章"><ul><li><a href="/posts/757210256.html" rel="bookmark" title="Hexo介绍及安装">Hexo介绍及安装</a></li><li><a href="/posts/3617638497.html" rel="bookmark" title="Hexo配置及迁移">Hexo配置及迁移</a></li><li class="active"><a href="/posts/1378412876.html" rel="bookmark" title="Hexo主题安装及配置">Hexo主题安装及配置</a></li><li><a href="/posts/3061789372.html" rel="bookmark" title="Hexo项目自动部署">Hexo项目自动部署</a></li></ul></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" loading="lazy" decoding="async" itemprop="image" alt="LinuxLearner" src="/assets/avatar.jpg"><p class="name" itemprop="name">LinuxLearner</p><div class="description" itemprop="description">这是一个LinuxSre相关的技术博客</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">13</span><span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">5</span><span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">10</span><span class="name">标签</span></a></div></nav><div class="social"><a target="_blank" rel="noopener" href="https://github.com/yourname" class="item github" title="https:&#x2F;&#x2F;github.com&#x2F;yourname"><i class="ic i-github"></i></a><a href="mailto:zlf1570380578@163.com" class="item email" title="mailto:zlf1570380578@163.com"><i class="ic i-envelope"></i></a></div><div class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>首页</a></li><li class="item"><a href="/archives/" rel="section"><i class="ic i-list-alt"></i>归档</a></li><li class="item"><a href="/categories/" rel="section"><i class="ic i-th"></i>分类</a></li><li class="item"><a href="/tags/" rel="section"><i class="ic i-tags"></i>标签</a></li><li class="item"><a href="/about/" rel="section"><i class="ic i-about"></i>关于</a></li><li class="item"><a href="/friends/" rel="section"><i class="ic i-heart"></i>友链</a></li></div></div></div></div><ul id="quick"><li class="prev pjax"><a href="/posts/3061789372.html" rel="prev" title="上一篇"><i class="ic i-chevron-left"></i></a></li><li class="up"><i class="ic i-arrow-up"></i></li><li class="down"><i class="ic i-arrow-down"></i></li><li class="next pjax"><a href="/posts/3617638497.html" rel="next" title="下一篇"><i class="ic i-chevron-right"></i></a></li><li class="percent"></li></ul></div></div><div class="dimmer"></div></div></main><footer id="footer"><div class="inner"><div class="widgets"><div class="rpost pjax"><h2>随机文章</h2><ul><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="分类于Linux基础知识">Linux基础知识</a></div><span><a href="/posts/3847727083.html">01.Linux历史介绍</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Hexo/" title="分类于Hexo">Hexo</a></div><span><a href="/posts/1378412876.html">Hexo主题安装及配置</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80/" title="分类于Linux基础">Linux基础</a></div><span><a href="/posts/1916920075.html">课程规划111111</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="分类于Linux基础知识">Linux基础知识</a></div><span><a href="/posts/3049183777.html">04.Linux文件管理</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="分类于Linux基础知识">Linux基础知识</a></div><span><a href="/posts/454805913.html">02.Linux系统安装</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="分类于Linux基础知识">Linux基础知识</a></div><span><a href="/posts/2594899394.html">03.LinuxShell初识</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80/" title="分类于Linux基础">Linux基础</a></div><span><a href="/posts/1916920075.html">课程规划</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/ELK/" title="分类于ELK">ELK</a><i class="ic i-angle-right"></i><a href="/categories/ELK/filebeat/" title="分类于filebeat">filebeat</a></div><span><a href="/posts/804899506.html">Filebeat入门</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="分类于Linux基础知识">Linux基础知识</a></div><span><a href="/posts/3693312163.html">Lepus监控数据库</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Hexo/" title="分类于Hexo">Hexo</a></div><span><a href="/posts/3617638497.html">Hexo配置及迁移</a></span></li></ul></div><div class="rpost pjax"><h2>最新评论</h2><ul class="leancloud-recent-comment" id="new-comment"></ul></div></div><div class="status"><div class="copyright">&copy; 2025 -<span itemprop="copyrightYear">2025</span><span class="with-love"><i class="ic i-sakura rotate"></i></span><span class="author" itemprop="copyrightHolder">LinuxLearner @ hexo-blog</span></div><div class="count"><span class="post-meta-item-icon"><i class="ic i-chart-area"></i></span><span title="站点总字数">78k 字</span><span class="post-meta-divider"> | </span><span class="post-meta-item-icon"><i class="ic i-coffee"></i></span><span title="站点阅读时长">1:11</span></div><div class="powered-by">基于 <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a> & Theme.<a target="_blank" rel="noopener" href="https://github.com/theme-shoka-x/hexo-theme-shokaX/">ShokaX</a></div><br><span style="display:inline;height:20px;line-height:20px;margin:0 0 0 5px;color:var(--grey-5)"><a target="_blank" rel="noopener" href="https://beian.miit.gov.cn">xxx</a><br><a target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=xxx"><img loading="lazy" decoding="async" data-src="/assets/" style="max-width:2em;display:inline" width="20" height="20" alt="备案">xxx</a></span></div></div></footer></div><script data-config type="text/javascript">var LOCAL = {
    ispost: true,
        path: `posts/1378412876.html`,
        favicon: {
        show: `（●´3｀●）やれやれだぜ`,
        hide: `(´Д｀)大変だ！`
    },
    search: {
        placeholder: "文章搜索",
        empty: "关于 「 ${query} 」，什么也没搜到",
        stats: "${time} ms 内找到 ${hits} 条结果"
    },
    copy_tex: false,
    katex: false,
    mermaid: false,
    audio: undefined,
    fancybox: true,
    nocopy: false,
    outime: true,
    template: `<div class="note warning"><p><span class="label warning">文章时效性提示</span><br>这是一篇发布于 {{publish}} 天前，最后一次更新在 {{updated}} 天前的文章，部分信息可能已经发生改变，请注意甄别。</p></div>`,
    quiz: {
        choice: `单选题`,
        multiple: `多选题`,
        true_false: `判断题`,
        essay: `问答题`,
        gap_fill: `填空题`,
        mistake: `错题备注`
    },
    ignores: [
        (uri) => uri.includes('#'),
        (uri) => new RegExp(LOCAL.path + '$').test(uri),
            []
    ]
};</script><script src="https://s4.zstatic.net/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha384-k6YtvFUEIuEFBdrLKJ3YAUbBki333tj1CSUisai5Cswsg9wcLNaPzsTHDswp4Az8" crossorigin="anonymous" fetchpriority="high"></script><script src="https://s4.zstatic.net/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha384-ZvpUoO&#x2F;+PpLXR1lu4jmpXWu80pZlYUAfxl5NsBMWOEPSjUn&#x2F;6Z&#x2F;hRTt8+pR6L4N2" crossorigin="anonymous" fetchpriority="high"></script><script src="/js/siteInit.js?v=0.4.17" type="module" fetchpriority="high" defer></script></body></html><!-- rebuild by hrmmi -->